package com.dxf.sysadmin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 菜单表
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("`sys-menu`")
@ApiModel(value="Sys-menu对象", description="菜单表")
public class SysMenu extends Model<SysMenu> {

    private static final long serialVersionUID = 1L;

    /**
     *菜单主键
     */
    @ApiModelProperty(value = "菜单主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     *菜单名
     */
    @ApiModelProperty(value = "菜单名")
    private String name;

    /**
     *上级菜单
     */
    @ApiModelProperty(value = "上级菜单")
    @TableField("parentId")
    private Long parentId;

    /**
     *排序码
     */
    @ApiModelProperty(value = "排序码")
    @TableField("sortCode")
    private Integer sortCode;

    /**
     *程序路径
     */
    @ApiModelProperty(value = "程序路径")
    @TableField("appUrl")
    private String appUrl;

    /**
     *图标路径
     */
    @ApiModelProperty(value = "图标路径")
    @TableField("imgUrl")
    private String imgUrl;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
